﻿Module Module1
    Public cn As ADODB.Connection
    Public rs As ADODB.Recordset



    Sub connect()
        Try
            cn = New ADODB.Connection



            cn.ConnectionString = "Provider = microsoft.ace.oledb.12.0; data source = Resibo.accdb"
            cn.Open()

        Catch ex As Exception
            MsgBox("Cannot connect to the database")
        End Try
    End Sub
End Module
